from PIL import Image

Image.open(r"d:\logo3.png").resize((72,35)).save(r"d:\logo3.png")
#Image.open(r"d:\logo.png").convert("").save(r"d:\favicon.ico")
#Image.open(r"d:\logo3.png").convert("LA").save(r"d:\favicon3.ico")    #去掉颜色